package com.itheima.chain;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/*
    只拦截访问  /kingServlet 资源
 */
@WebFilter("/kingServlet")
public class FilterOne implements Filter {
    public void destroy() {
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("大东门: 健康码检查");
        chain.doFilter(req, resp);
        System.out.println("大东门:离开了...");
    }

    public void init(FilterConfig config) throws ServletException {

    }

}
